//
//  HBShakeResultFriendListCell.m
//  HuoBao
//
//  Created by chaiyanan on 15/12/10.
//  Copyright © 2015年 jinxin. All rights reserved.
//

#import "HBShakeResultFriendListCell.h"

@implementation HBShakeResultFriendListCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self)
    {
        self.backgroundColor = [UIColor clearColor];
        self.selectionStyle = UITableViewCellSelectionStyleNone;
        [self createCustomView];
    }
    return self;
}

- (void)createCustomView
{
    UIView *bgView = [[UIView alloc]initWithFrame:CGRectMake(15, 0, SCREEN_WIDTH-30, Height_HBShakeResultFriendListCell)];
    bgView.backgroundColor = [LCCommon getColor:@"37383d"];
    [self.contentView addSubview:bgView];
    
    self.titleLable = [self createLableWithTextColor:[LCCommon getColor:@"fa9838"] font:[UIFont systemFontOfSize:14.0f] text:@"贾阳阳" textAlignment:NSTextAlignmentCenter frame:CGRectMake(0, 0, bgView.width/2, Height_HBShakeResultFriendListCell) superView:bgView];
    self.rateLable = [self createLableWithTextColor:[LCCommon getColor:@"fa9838"] font:[UIFont systemFontOfSize:14.0f] text:@"+0.1%" textAlignment:NSTextAlignmentCenter frame:CGRectMake(bgView.width/2, 0, bgView.width/2, Height_HBShakeResultFriendListCell) superView:bgView];
    
    self.titlePlace = [[UILabel alloc] initWithFrame:CGRectMake(self.titleLable.width/2 - 20, 5, 40, 2)];
    [self.titlePlace setBackgroundColor:[LCCommon getColor:@"FA9838"]];
    [bgView addSubview:self.titlePlace];
    self.titlePlace.hidden = YES;
    
    self.ratePlace = [[UILabel alloc] initWithFrame:CGRectMake(self.rateLable.width/2 - 20 + self.rateLable.x, 5, 40, 2)];
    [self.ratePlace setBackgroundColor:[LCCommon getColor:@"FA9838"]];
    [bgView addSubview:self.ratePlace];
    self.ratePlace.hidden = YES;
    
}

- (UILabel *)createLableWithTextColor:(UIColor *)color font:(UIFont *)font text:(NSString *)text textAlignment:(NSTextAlignment)textAlignment frame:(CGRect)frame superView:(UIView *)superView
{
    UILabel *lable = [[UILabel alloc]initWithFrame:frame];
    lable.textColor = color;
    lable.font = font;
    lable.text = text;
    lable.textAlignment = textAlignment;
    [superView addSubview:lable];
    return lable;
}


@end
